package com.fj.consumer.demos.web;

import com.fj.provider.api.dto.UserModel;
import com.fj.provider.api.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author fj
 * @date 2024/3/7 17:30
 */
@RequestMapping(value = "user")
@RestController
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping(value = "{id}")
    UserModel getUser(@PathVariable Long id){
        return userService.getUser(id);
    }
}
